home *** CD-ROM | disk | FTP | other *** search
/ PC User 2001 August / APC_Aug2001_CD2.iso / features / web_dev / files / mwjpp516.exe / %MAINDIR% / Tools / Html / insert Blockquote.script < prev    next >
Encoding:
Text File  |  2001-06-19  |  943 b   |  33 lines

  1. !!Script
  2. // Copyright ⌐ 1997-1998 - Modelworks Software
  3.  
  4. /**
  5. @Tool: insert Blockquote~wraps the current selection with 
  6. <BLOCKQUOTE> ... </BLOCKQUOTE> tags. 
  7. @EndTool: 
  8. @Summary: insert Blockquote~wraps selection with the Blockquote tag
  9. */
  10.  
  11. function DoCommand()
  12. {
  13.   var editor = getActiveEditor();
  14.   if (editor)
  15.   {
  16.     var selection = editor.getSelection();
  17.     var upperCaseHtmlTags = getMapFileValue("Preferences", "Upper Case HTML Tags", true);
  18.     if(upperCaseHtmlTags)
  19.     {
  20.       editor.insert(selection.endLineIndex, selection.endCharIndex, "</BLOCKQUOTE>");
  21.       editor.insert(selection.startLineIndex, selection.startCharIndex, "<BLOCKQUOTE>");
  22.     }
  23.     else
  24.     {
  25.       editor.insert(selection.endLineIndex, selection.endCharIndex, "</blockquote>");
  26.       editor.insert(selection.startLineIndex, selection.startCharIndex, "<blockquote>");
  27.     }
  28.     editor.setActive();
  29.   }
  30. }
  31.  
  32. !!/Script
  33.